import threading
import time
from multiprocessing import Process

from selenium.webdriver.support import expected_conditions as EC
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait

from PO.scripts.test01_login_successs import TestLogin
from conftest import BASE_DIR

# options = webdriver.ChromeOptions()
# options.add_experimental_option('detach', True)
# driver = webdriver.Chrome(options=options)
# class MyProcess():
#     def __init__(self):
#         self.driver = webdriver.Chrome()
#         self.driver.maximize_window()
#         self.driver.get("http://127.0.0.1/index.php/Home/user/login.html")
#
#
#     def test_login01(self):
#         self.driver.find_element(By.ID, 'username').send_keys("18325539630")
#         self.driver.find_element(By.ID, 'password').send_keys('wsf123456')
#         self.driver.find_element(By.ID, 'verify_code').send_keys('8888')
#         self.driver.find_element(By.NAME, 'sbtbutton').click()
#
#         self.driver.quit()
#
#
#     def test_login02(self):
#         self.driver.find_element(By.ID, 'username').send_keys("18325539631")
#         self.driver.find_element(By.ID, 'password').send_keys('wsf123456')
#         self.driver.find_element(By.ID, 'verify_code').send_keys('8888')
#         self.driver.find_element(By.NAME, 'sbtbutton').click()
#         time.sleep(5)
#         self.driver.quit()

if __name__ == '__main__':
    obj=TestLogin()
    t=threading.Thread(target=obj.test_login01)
    t.start()





